<template>
  <div class="three-con">{{ num }}</div>
</template>

<script>
// 第三步 接收方组件
import BusCon from '@/utils/EventBus';
export default {
   data(){
        return {
            num:''
        }
    },
  created() {
    // 监听BusCon 的事件
    BusCon.$on("sendMsg", (msg) => {
      console.log("接收消息",msg);
      this.num = msg
    });
  },
};
</script>

<style>
.three-con {
  width: 500px;
  height: 100px;
  background-color: skyblue;
}
</style>